﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace TianShu.Office.Abstractions
{
    public interface IExcelReadService : IDisposable
    {
        void LoadWorkbook(string filePath);
        void LoadWorkbook(Stream fileStream);

        /// <summary>
        /// 根据名称管理器读取excel内容为一个列表
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="sheetIndex"></param>
        /// <returns></returns>
        List<T> ReadListByNameManager<T>(int sheetIndex = 0) where T:class,new();
        /// <summary>
        /// 根据名称管理器读取excel内容为一个列表
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="sheetName"></param>
        /// <returns></returns>
        List<T> ReadListByNameManager<T>(string sheetName = null) where T : class, new();

    }
}
